// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "WorldConnectable.h"
#include "WorldJunctionParts.h"

/**
 * An entity of a junction.
 */
class FWorldJunction : public FWorldConnectable
{

public:

	using Ptr = std::shared_ptr<FWorldJunction>;
	using Super = FWorldConnectable;

	FWorldEntityPartArrayReference< FWorldJunctionConnection, 1, INT_MAX >	Connection;
	FWorldEntityPartArrayReference< FWorldJunctionPriority, 0, INT_MAX >	Priority;
	FWorldEntityPartArrayReference< FWorldJunctionController, 0, INT_MAX >	Controller;

public:

	FWorldJunction();
	FWorldJunction(const json& j);
	~FWorldJunction() override;

	void Resolve(FWorldEntityReferencing& referencing) override;

	WORLD_ENTITY_META_DECLARE(FWorldJunction)

};
